package org.lq.shopping.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * 配置文件工具类
 * @author Quaint
 * @date 2018年9月25日
 */
public class ProperUtil {
	private static Properties properties;
	static {
		properties = new Properties();
		InputStream is = Thread
				.currentThread()
				.getContextClassLoader()
				.getResourceAsStream("jdbc.properties");
		try {
			properties.load(is);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public static String getValueByKey(String key) {
		return properties.getProperty(key);
	}
}
